import React, { Component } from 'react';

class TodoItem extends Component {
  constructor(props) {
    super(props)
    this.handleDelete = this.handleDelete.bind(this)
  }
  render() {
    return (
      <li onClick={this.handleDelete}>
        {this.props.item}
      </li>
    )
  }
  componentWillReceiveProps() {
  }
  handleDelete() {
    this.props.handleDeleteItem(this.props.index)
  }
}
export default TodoItem;